﻿#region 命名空间

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Practices.EnterpriseLibrary.PolicyInjection;
using WinnerCMS.BLL;
using WinnerCMS.Common;
using WinnerCMS.Model;

#endregion

namespace WinnerCMS.WebUI.Controllers
{
    public class DigoController : ApiController
    {
        private readonly DiggManage _bll;

        public DigoController()
        {
            _bll = PolicyInjection.Create<DiggManage>();
        }

        public Result Post(int contentId, string type)
        {
            return _bll.Add(contentId, type);
        }

        public Digg Get(int contentId)
        {
            return _bll.AjaxGetDigo(contentId);
        }
    }
}